<template>
  <view>
    <!-- #ifdef H5 -->
    <van-nav-bar @click-left="onClickLeft" left-arrow></van-nav-bar>
    <!-- #endif -->
    <web-view :src="url"></web-view>
  </view>
</template>

<script lang="ts" setup>
import { systemInfo } from '@mixins/info';
const url = ref('');
onLoad((option: any) => {
  url.value = option.url;
});
// #ifdef H5
const onClickLeft = () => {
  uni.navigateBack();
};
setTimeout(() => {
  const navBarEle = document.querySelector('.van-nav-bar') as HTMLElement;
  navBarEle.style.paddingTop = `${systemInfo.statusBarHeight}px`;
  const uniWebview = document.querySelector('.uni-webview--fullscreen') as HTMLElement;
  uniWebview.style.top = `${systemInfo.navHeight}px`;
});
// #endif
</script>